{
 "metadata": {
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1-final"
  },
  "orig_nbformat": 2,
  "kernelspec": {
   "name": "python3",
   "display_name": "Python 3",
   "language": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2,
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "\"\"\"\n",
    "读取预料\n",
    "\"\"\"\n",
    "import os"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "'e:\\\\PycharmOut\\\\CGAI\\\\TestChineseWordVector'"
      ]
     },
     "metadata": {},
     "execution_count": 2
    }
   ],
   "source": [
    "cd=os.path.abspath('')\n",
    "cd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "'e:\\\\PycharmOut\\\\CGAI\\\\TestChineseWordVector\\\\pinglun\\\\pos.txt'"
      ]
     },
     "metadata": {},
     "execution_count": 3
    }
   ],
   "source": [
    "pos_file_path=os.path.join(cd,'pinglun','pos.txt')\n",
    "pos_file_path"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": [
      "1    距离川沙公路较近,但是公交指示不对,如果是\"蔡陆线\"的话,会非常麻烦.建议用别的路线.房间较为简单.\n\n 距离川沙公路较近,但是公交指示不对,如果是\"蔡陆线\"的话,会非常麻烦.建议用别的路线.房间较为简单.\n\n距离川沙公路较近,但是公交指示不对,如果是\"蔡陆线\"的话,会非常麻烦.建议用别的路线.房间较为简单.\n\n1    我住的是特色标间，所谓特色，是有些类似家的感觉。寝具不是单调的白色，是条纹和大格子的，感觉很温馨。圈儿椅的靠垫是卡通的加菲猫头，明黄的颜色有点扎眼，和周围配在一起感觉有点不协调。客房硬件评价3.5分。加湿器、烫衣板、电熨斗、吹风机、小冰箱等俱全。缺点：液晶电视固定在墙上，位置不好。一是遮挡了一个电源插座；二是与桌子搭配不当。桌子（与冰箱柜一体）在电视下方，如果坐在桌子旁上网或工作学习，正好挡住了电视屏幕。错开坐，正好是冰箱柜，腿脚伸不开。\n\n1    入住的是度假区的豪华海景房,前台给了5楼(最高6楼),然后差不多100%的海景,虽然是挂牌5星的,但是本人觉得是4星的标准,和我后来入住的5星喜来登差了蛮多的,不过整体来说还是符合他家的价钱的.\n\n1    就是老了点，个别房间窗户小，隔音差，其他很好，毕竟是老牌三星级吗！\n\n"
     ]
    }
   ],
   "source": [
    "\n",
    "with open(pos_file_path,'r',encoding='utf8') as r:\n",
    "    text=r.readlines()\n",
    "\n",
    "    print(text[0][5:])\n",
    "    print(text[10])\n",
    "    print(text[100])\n",
    "    print(text[1000])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ]
}